package com.oktest.measure.db.room

import androidx.room.*
import com.oktest.measure.entity.HomeTaskDetail

/**
 * @Author HaoXin
 * @Date 2020/11/29
 */
@Dao
interface HomeTaskDetailDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(detail: HomeTaskDetail)

    @Query("select * from HomeTaskDetail where id=:id")
    fun query(id: String): HomeTaskDetail?

    @Query("select * from HomeTaskDetail")
    fun loadAll(): List<HomeTaskDetail>

    @Delete()
    fun delete(detail: HomeTaskDetail?)

    @Update(onConflict = OnConflictStrategy.REPLACE)
    fun update(detail: HomeTaskDetail)
}